package com.justech.eat.repository;

import com.justech.eat.entity.Order;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @program: eat-service
 * @description:
 * @author: feifei.li
 * @create: 2020-05-25 15:48
 **/
@Repository
public interface OrderRepository extends JpaRepository<Order, Long> {
    Order findByDateAndJobNumber(String date, String jobNumber);

    /**
     * 查询某个用户区间内的订餐详情
     *
     * @param start
     * @param end
     * @param jobNumber
     * @return
     */
    List<Order> findByDateBetweenAndJobNumber(String start, String end, String jobNumber);

    /**
     * 查询所有的报餐记录
     *
     * @param date 日期 必填
     * @return
     */
    List<Order> findByDate(String date);
}
